package com.gxa.modules.pc.sys.usermanager.controller;

import com.gxa.common.utils.Result;
import com.gxa.modules.pc.sys.usermanager.dto.MenuPcDto;
import com.gxa.modules.pc.sys.usermanager.dto.RolePcDto;
import com.gxa.modules.pc.sys.usermanager.service.MenuPcService;
import com.gxa.modules.pc.sys.usermanager.service.RolePcService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName RolePcController
 * @Description
 * @Author Mr.YUAN
 * @Date 2022/11/17 20:28
 */
@Api(tags = "权限管理（菜单管理）")
@RestController
@RequestMapping("/menu")
public class MenuPcController {

    @Autowired
    private MenuPcService menuPcService;

    @ApiOperation("查询所有权限（菜单）")
    @GetMapping("/list")
    public Result list() {
        List<MenuPcDto> menuPcDtos = menuPcService.queryMenu();
        return new Result().ok(menuPcDtos);
    }
}